﻿using System;
using System.Collections.Generic;
using System.Text;

namespace dllLink
{
    // modèle brownien géométrique multidimensionnel
    internal class ModelMBG : Model
    {
        private double mvSigma;
        
        internal override void mSetParameters(Estimator theEstimator){}

        internal override void mSetParameters(double[] theParams)
        {
            mvSigma = theParams[0];
        }

        //diffusion du log du prix
        internal override void mDiffuse(ref double theCurrentPrice, double[] theParams)
        {
            double myWi = theParams[0];
            double myRate = theParams[1];
            theCurrentPrice += myRate* mvDt + mvSigma * (-mvDt*mvSigma / 2.0 + mvSqrtDt*myWi);
        }
    }
}
